export default {
	demoTanForm(tree) {
		const area = tree.initArea({
			span: 24
		})
		area.add(area.jsInput({
			label: '输入一号',
			name: 'input',
			rule: ['required']
		}))
	},
	demoTanPane1(tree) {
		const area = tree.initArea({
			span: 24
		})
		area.add(area.jsInput({
			label: '输入一号',
			name: 'input1',
			rule: ['required']
		}))
	},
	demoTanPane2(tree) {
		const area = tree.initArea({
			span: 24
		})
		area.add(area.jsInput({
			label: '输入二号',
			name: 'input2',
			rule: ['required']
		}))
	},
	demoTanApolar(tree) {
		const area = tree.initArea()
		area.add(area.jsButton({
			innerText: '新增弹框',
			click: () => {
				const levelNumber = this.tanData.levelNumber + 1
				this.$jiess.nodeTan.open({
					title: `当前层级【${levelNumber}】`,
					levelNumber,
					pageConfig: {
						form: {
							paramKey: 'demoTanApolar'
						}
					}
				})
			}
		}), area.jsButton({
			innerText: '全部关闭',
			click: () => {
				this.$jiess.nodeTan.closeAll()
			}
		}))
	},
	demoSearch(tree) {
		const area = tree.initArea()
		area.addNode(area.jsInput({
			label: '模糊搜索',
			name: 'searchText',
			placeholder: '请输入搜索内容'
		}), area.jsButton({
			innerText: '搜索',
			buttonType: 'searchButton'
		}))
	},
	demoShowBase(tree) {
		const area = tree.initArea()
		area.add(area.jsInput({
			label: '输入一号',
			name: 'field1',
		}), area.jsSelect({
			label: '直接配置',
			name: 'field2',
			options: [{
				value: 1,
				label: '语文'
			}, {
				value: 2,
				label: '数学'
			}]
		}))
	},
	demoShowPane1(tree) {
		const area = tree.initArea({
			levelName: 'name1'
		})
		area.add(area.jsInput({
			label: '输入一号',
			name: 'field1',
		}), area.jsSelect({
			label: '直接配置',
			name: 'field2',
			options: [{
				value: 1,
				label: '语文'
			}, {
				value: 2,
				label: '数学'
			}]
		}))
	},
	demoShowPane2(tree) {
		const area = tree.initArea({
			levelName: 'name2'
		})
		area.add(area.jsInput({
			label: '输入一号',
			name: 'field1'
		}))
	}
}
